package com.biglead.feign.clients;

import com.biglead.common.pojo.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient("auth-api")
public interface FeignAuthClient {

    @PostMapping("/oauth/token")
    Object postAccessToken(@RequestParam MultiValueMap<String, String> parameters,
                           @RequestHeader MultiValueMap<String, String> headers);
    @RequestMapping(method = RequestMethod.POST, value = "/oauth/token", headers = {"Content-Type: multipart/form-data", "Authorization=Basic WGNXZWJBcHA6WGNXZWJBcHA="})
    Map<String,Object> generateToken(@RequestBody MultiValueMap<String, String> map);
}
